<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<c:forEach var="message" items="${messages}">
	<c:choose>
		<c:when test="${message.status == 'SUCCESS'}">
			<div class="alert alert-success">${message.text}</div>
		</c:when>
		<c:when test="${message.status == 'INFO'}">
			<div class="alert alert-info">${message.text}</div>
		</c:when>
		<c:when test="${message.status == 'WARN'}">
			<div class="alert alert-block">${message.text}</div>
		</c:when>
		<c:when test="${message.status == 'ERROR'}">
			<div class="alert alert-error">${message.text}</div>
		</c:when>
	</c:choose>
</c:forEach>